package 耿翔宇;

import java.io.File;
import java.util.ArrayList;
import java.util.Collections;
import java.util.List;

import cn.hutool.core.io.FileUtil;

public class CallName01 {

	public static void main(String[] args) {
		RandomRollCall();
	}

	private static void RandomRollCall() {
		List<String> info = FileUtil.readLines(new File("names.txt"), "utf-8");
		Collections.shuffle(info);
		List<String> name = new ArrayList<>();
		name.add(info.get(0).split("-")[0]);
		System.out.println(name.get(0));
		FileUtil.writeLines(name, new File("randomcall01.txt"), "utf-8",true);
	}
	
}
